from urllib.parse import quote
from urllib.parse import unquote
from zhipuai import ZhipuAI


original_string = "社会福利"
encoded_string = quote(original_string)
print(encoded_string)  # 输出: Hello%2C%20World%21%20%E4%BD%A0%E5%A5%BD%EF%BC%8C%E4%B8%96%E7%95%8C%EF%BC%81
decoded_string = unquote(encoded_string)
print(decoded_string)  # 输出: Hello, World! 你好，世界！


client = ZhipuAI()  # 填写您自己的APIKey

response = client.videos.generations(
    model="cogvideox",
    prompt="比得兔开小汽车，游走在马路上，脸上的表情充满开心喜悦。"
)
print(response)